require 'rubygems'
require 'rufus/scheduler'

class MainController < ApplicationController

  before_filter :require_user
  def index
    #PDFKit.new('http://google.co.th').to_file('output.pdf')
  end

  def job
    scheduler = Rufus::Scheduler.start_new
    scheduler.cron '0 22 * * 1-5' do
    # every day of the week at 22:00 (10pm)
      puts 'activate security system'
    end
    scheduler.every '5s' do
      puts 'check blood pressure'
    end
  end

end
